package staticFactory.a3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test1 {
    public static void main(String[] args) {
        //1.AppliocationContext
        ApplicationContext ac=
                new ClassPathXmlApplicationContext("applicationContext.xml");
        Teacher t=ac.getBean("t1", Teacher.class);
        //2. 用AppliocationContext获取HelloSpring对象
        //根据bean配置 :  id(b1)获取HelloSpring对象
        t.saoDi();
    }
}
